<#if formField.linkable && formField.linkFunction??>
<script>
function showLink${formField.orderNumber}(funcId,processId,functionName,clearSession,fieldId,fieldName,value,entityId) {
	var url = TDQS.CONTEXT_PATH+'business/process?tdqssid='+TDQS.SESSION_ID+'&parentInstance.id='+$('#businessInstanceId').val()+ "&function.id="+funcId+"&businessProcess.id="+processId+"&form.id="+$('#formId').val();
	if('1'==clearSession) {
      	url += "&clearSession=true";
    }
    if(fieldName && fieldName!='') {
	      url  += ("&paramsMap['"+fieldName+"'].field.id="+fieldId);
		  url  += ("&paramsMap['"+fieldName+"'].value="+value);
		  url  += ("&paramsMap['"+fieldName+"'].entityId="+entityId);
	  }
	url += ("&isInnerEdit="+$('#isInnerEdit').val());
    url += "&date="+new Date().toLocaleString();
    if(!typeof(parent.addTabPage) == 'undefined') {
    	parent.addTabPage(url,functionName);
    } else if(!typeof(addTabPage) == 'undefined') {
    	addTabPage(url,functionName);
    } else {
    	document.location.href = url;
    }
}

</script>
</#if>
<#if formField.hidden?? && formField.hidden=="1">
	<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
	<input type=hidden id=${field.name} name="fieldMap['${field.name}'].value" <#if businessInstanceField?? && businessInstanceField.value??>value="${businessInstanceField.value}"</#if>></input>
<#else>
	<div <#if needBreakWord?? && needBreakWord=='1'>style="word-break: break-all;"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
	
	<#if formField.readonly?? && formField.readonly=="1">
		<label id="${field.name}Label">
		<#if businessInstanceField??>
			<#if formField.linkable && formField.linkFunction??>
			<a href="javascript:void(0);" onclick="showLink${formField.orderNumber}('<#if formField.linkFunction.id??>${formField.linkFunction.id}</#if>','<#if formField.linkFunction.businessProcess?? && formField.linkFunction.businessProcess.id??>${formField.linkFunction.businessProcess.id}</#if>','<#if formField.linkFunction.displayName??>${formField.linkFunction.displayName}</#if>','<#if formField.linkFunction.clearSession??>${formField.linkFunction.clearSession}</#if>','<#if formField.field?? && formField.field.id??>${formField.field.id}</#if>','<#if formField.field?? && formField.field.name??>${formField.field.name}</#if>','<#if businessInstanceField.value??>${businessInstanceField.value}</#if>','<#if businessInstanceField.entityId??>${businessInstanceField.entityId}</#if>');return false;">${businessInstanceField.value?default('')}</a>
			<#else>
			<#if fieldrule??  && fieldrule.dataType =="number"   && fieldrule.precision !="0" && businessInstanceField.value?? && businessInstanceField.value!=''>
				#{businessInstanceField.value?eval;m0M2}
			<#else>
				${businessInstanceField.value?default('')}			
			</#if>


			</#if>
		</#if>
		</label>
		<input type=hidden id=${field.name} name="fieldMap['${field.name}'].value" <#if businessInstanceField??>value="${businessInstanceField.value?default('')}"</#if>></input>
	
	
	
	
	
	<#else>
		
			


		<input type="text"  <#if fieldrule??> datarule="${fieldrule.dataType}"    datarulejson='${fieldrule.json}'  </#if>  onblur="this.value=this.value.trim();" id=${field.name} name="fieldMap['${field.name}'].value" <#if businessInstanceField??>value="${businessInstanceField.value?default('')}"</#if> class="text" <#if formField.width??>style="width:${formField.width};"</#if> ></input> 
	</#if>
	<#if field.unit??>
	&nbsp;${field.unit}
	</#if>
	
	<#if businessInstanceField?? && businessInstanceField.entityId??>
		<input type=hidden name="fieldMap['${field.name}'].entityId"  value="${businessInstanceField.entityId}">
	</#if>
	</div>
</#if>